<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组的迭代器方法entries</title>
</head>
<body>
    <script>

        let arr = ['1','2','3']

        console.log(arr.entries()) //输出的是数组的迭代器 -- Iterator

        console.log(arr.entries() instanceof Object) // 是个对象

        for (let [index,ele] of arr.entries()){ // 因为他是数组的迭代器，所以可以被for--of遍历
            console.log(index)
            console.log(ele)
            console.log('--------------------')
        }

        console.log(arr.toString())
        console.log(arr.valueOf())

        console.log(arr.find(item => {
            return item > '2'
        }))
    </script>
</body>
</html>